using System;

namespace InfoJetSoft.Service.ManagedCode
{
	/// <summary>
	/// Summary description for Util.
	/// </summary>
	public class Util : Microsoft.Office.Interop.InfoPath.SemiTrust.UtilObject
	{
		
		private InfoJetSoft.Service.Entity.Form form = null;
		private Date date = null;

		public Util( InfoJetSoft.Service.Entity.Form frm )
		{
			this.form = frm;
			this.date = new Date();
		}

		public bool Match(string bstrValue, string bstrPattern)
		{
			return System.Text.RegularExpressions.Regex.IsMatch( bstrValue, bstrPattern );
		}

		public Microsoft.Office.Interop.InfoPath.SemiTrust.DateObject Date 
		{ 
			get
			{
				return this.date;
			}
		}

		//Unsupported
		public Microsoft.Office.Interop.InfoPath.SemiTrust.MathObject Math 
		{
			get
			{
				return null;
			}
		}

	}
}
